# -*- mode: python -*-

Import("env")

env.Command(['error_codes.h', 'error_codes.cpp'], ['generate_error_codes.py', 'error_codes.err'],
            '$PYTHON $SOURCES $TARGETS')

env.Library('base', ['error_codes.cpp',
                     'global_initializer.cpp',
                     'global_initializer_registerer.cpp',
                     'init.cpp',
                     'initializer.cpp',
                     'initializer_context.cpp',
                     'initializer_dependency_graph.cpp',
                     'validate_locale.cpp',
                     'make_string_vector.cpp',
                     'parse_number.cpp',
                     'status.cpp',
                     'string_data.cpp',
                     ],
                     LIBDEPS=[
                     '$BUILD_DIR/third_party/murmurhash3/murmurhash3',
                     ])

env.CppUnitTest('initializer_dependency_graph_test',
                ['initializer_dependency_graph_test.cpp'],
                LIBDEPS=['base'])

env.CppUnitTest('initializer_test',
                ['initializer_test.cpp'],
                LIBDEPS=['base'])

env.CppUnitTest('owned_pointer_vector_test',
                ['owned_pointer_vector_test.cpp'],
                LIBDEPS=['base'])

env.CppUnitTest('owned_pointer_map_test',
                ['owned_pointer_map_test.cpp'],
                LIBDEPS=['base'])

env.CppUnitTest('parse_number_test',
                ['parse_number_test.cpp'],
                LIBDEPS=['base'])

env.CppUnitTest('status_test',
                'status_test.cpp',
                LIBDEPS=['base'])

env.CppUnitTest('counter_test',
                'counter_test.cpp',
                LIBDEPS=['base'])

env.CppUnitTest('string_data_test',
                'string_data_test.cpp',
                LIBDEPS=['$BUILD_DIR/mongo/unittest/unittest'])
